<!--
/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 * Copyright 2014 The moOde audio player project / Tim Curtis
 *
 * 汉化：Androidnews
 *
*/
-->
<div id="container">
    <div class="container">
        <h1 class="snd-config">音频</h1>

        <form class="form-horizontal" method="post">
            <legend>音频输出</legend>
            <p class="sub-legend">
                从Pi HDMI/耳机、I2S或USB音频设备中进行选择.
                当输出到蓝牙扬声器或多房间发送器或接收器打开时,无法更改这些设置.
            </p>

            <div class="control-group">
                <label class="control-label" for="output-device">输出设备</label>
                <div class="controls">
                     <select id="output-device" name="output_device_cardnum" class="config-select-large" onchange="autoClick('#btn-set-output-device');" $_output_device_btn_disabled>
					$_mpd_select[device]
                </select>
                    <button id="btn-set-output-device" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                            name="update_output_device" value="novalue" $_output_device_btn_disabled><i
                        class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
                    <button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="nop" value="novalue"
                            $_output_device_btn_disabled>扫描</i></button>
                    <a aria-label="Help" class="config-info-toggle" data-cmd="info-output-device" href="#notarget"><i
                        class="fa-regular fa-sharp fa-info-circle"></i></a>
                    <span id="info-output-device" class="config-help-info">
					The list shows the ALSA card number and assigned audio device or "empty".
					The SCAN button refreshes the list to pick up newly connected USB audio devices.
				</span>
                </div>

                <label class="control-label" for="mixer-type">音量类型</label>
                <div class="controls">
                    <select id="mixer-type" name="mixer_type" class="config-select-large" onchange="autoClick('#btn-set-mixer-type');"
                            $_volume_type_btn_disabled>
                        $_mpd_select[mixer_type]
                    </select>
                    <button id="btn-set-mixer-type" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                            name="update_volume_type" value="novalue" $_volume_type_btn_disabled><i
                        class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
                    <a aria-label="Help" class="config-info-toggle" data-cmd="info-mixer-type" href="#notarget"><i
                        class="fa-regular fa-sharp fa-info-circle"></i></a>
                    <span id="info-mixer-type" class="config-help-info">
					Volume type used by MPD.<br>
					<b>- Hardware:</b> Audio device on-chip volume controller.<br>
					<b>- Software:</b> MPD software volume (32 bit float with dither).<br>
					<b>- Fixed (0dB):</b> Output 100% volume. Assumes a downstream volume control is used.<br>
					<b>- CamillaDSP:</b> CamillaDSP software volume (64 bit float with dither).
				</span>
                    <span class="config-help-static">
					在更改这些选项之前,请将音量设置为较低水平.
					$_software_and_dsd_warning
				</span>
                </div>

                <div class="$_camilladsp_volume_range_hide">
                    <label class="control-label" for="camilladsp-volume-range">音量范围</label>
                    <div class="controls">
                        <select id="camilladsp-volume-range" class="config-select-large" name="camilladsp_volume_range"
                                onchange="autoClick('#btn-set-camilladsp-volume-range');">
                            $_select[camilladsp_volume_range]
                        </select>
                        <button id="btn-set-camilladsp-volume-range" class="hide btn btn-primary btn-small config-btn-set btn-submit"
                                type="submit" name="update_camilladsp_volume_range" value="novalue"><i
                            class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
                        <a aria-label="Help" class="config-info-toggle" data-cmd="info-camilladsp-volume-range" href="#notarget"><i
                            class="fa-regular fa-sharp fa-info-circle"></i></a>
                        <span id="info-camilladsp-volume-range" class="config-help-info">
						This value represents the difference between the maximum loudness and background noise level.
						It is used to generate the volume curve which determines the loudness at each point on the CamillaDSP volume slider and moOde volume knob.
					</span>
                    </div>
                </div>

                <div class="config-horiz-rule"></div>

                <label class="control-label" for="i2sdevice">I2S设备名称</label>
                <div class="controls">
                    <select id="i2sdevice" class="config-select-large" name="i2sdevice" onchange="autoClick('#btn-set-i2sdevice');"
                            $_i2sdevice_btn_disable>
                        $_i2s[i2sdevice]
                    </select>
                    <button id="btn-set-i2sdevice" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                            name="update_i2s_device" value="novalue" $_i2sdevice_btn_disable><i
                        class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
                </div>
                <label class="control-label" for="i2soverlay">or DT overlay</label>
                <div class="controls">
                    <select id="i2soverlay" class="config-select-large" name="i2soverlay" onchange="autoClick('#btn-set-i2soverlay');"
                            $_i2soverlay_btn_disable>
                        $_i2s[i2soverlay]
                    </select>
                    <button id="btn-set-i2soverlay" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                            name="update_i2s_overlay" value="novalue" $_i2soverlay_btn_disable><i
                        class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
                    <span class="config-help-static">
					设置设备或覆盖后,重新启动,然后从输出设备列表中选择设备.
				</span>
                </div>

                <label class="control-label" for="drvoptions">驱动选项</label>
                <div class="controls">
                    <select id="drvoptions" class="config-select-large" name="drvoptions" onchange="autoClick('#btn-set-drvoptions');"
                            $_driveropt_btn_disable>
                        $_select[drvoptions]
                    </select>
                    <button id="btn-set-drvoptions" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                            name="update_drvoptions" value="novalue" $_driveropt_btn_disable><i
                        class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
                    <a aria-label="Help" class="config-info-toggle" data-cmd="info-drvoptions" href="#notarget"><i
                        class="fa-regular fa-sharp fa-info-circle"></i></a>
                    <span id="info-drvoptions" class="config-help-info">
					<b>slave:</b> If enabled, Boss and MiniBOSS DAC operate in slave mode required by Kali reclocker.<br>
					<b>glb_mclk:</b> If enabled, Kali MCLK is used and PLL for Piano 2.1 is disabled for best SQ.<br>
                </span>
                </div>

                <label class="control-label">芯片选项</label>
                <div class="controls">
                    <a href="chp-config.php" $_chip_link_disable>
                        <button class="btn btn-primary btn-medium config-btn" $_chip_btn_disable>编辑</button>
                    </a>
                </div>
            </div>

            <legend>ALSA选项</legend>
            <p class="sub-legend">                高级Linux声音架构(ALSA)是一个软件框架,也是Linux内核的一部分,为声卡设备驱动程序和音频应用程序提供应用程序编程接口(API).
            </p>

            <div class="control-group">
                <label class="control-label" for="alsavolume-max">最大音量</label>
                <div class="controls">
                    <input class="config-input-large" $_alsavolume_max_readonly type="number" maxlength="3" min="1" max="100"
                           id="alsavolume-max" name="alsavolume_max" value="$_alsavolume_max" required $_alsavolume_max_disable>
                    <button class="btn btn-primary btn-small config-btn-set btn-submit status-msg" type="submit"
                            name="update_alsavolume_max" value="novalue" $_alsavolume_max_disable><i
                        class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
                    <a aria-label="Help" class="config-info-toggle" data-cmd="info-alsavolume-max" href="#notarget"><i
                        class="fa-regular fa-sharp fa-info-circle"></i></a>
                    $_alsavolume_max_pct
                    <span id="info-alsavolume-max" class="config-help-info">
					This establishes the ALSA 0dB level when volume type is set to Software, Fixed or CamillaDSP, or when any Renderers are active.
					Alsamixer volume units (1 to 100) are used.
				</span>
                </div>

                <label class="control-label" for="alsa-output-mode">输出模式</label>
                <div class="controls">
                    <select id="alsa-output-mode" class="config-select-large" name="alsa_output_mode"
                            onchange="autoClick('#btn-set-alsa-output-mode');" $_alsa_output_mode_disable>
                        $_select[alsa_output_mode]
                    </select>
                    <button id="btn-set-alsa-output-mode" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                            name="update_alsa_output_mode" value="novalue" $_alsa_output_mode_disable><i
                        class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
                    <a aria-label="Help" class="config-info-toggle" data-cmd="info-alsa-output-mode" href="#notarget"><i
                        class="fa-regular fa-sharp fa-info-circle"></i></a>
                    <span class="config-help-static">
					ALSA: $_alsa_output_mode
				</span>
                    <span id="info-alsa-output-mode" class="config-help-info">
					<b>Default: </b>ALSA "plughw" plugin which performs format conversions if needed to match audio device requirements.<br>
					<b>Direct: </b>ALSA "hw" plugin which does not perform format conversions. The audio device must accept the given format.<br>
					<b>IEC958: </b>ALSA "iec958" plugin which provides IEC958_SUBFRAME_LE format for HDMI audio.<br>
					These modes apply to MPD, Bluetooth (inbound), AirPlay, Spotify Connect, Squeezelite and the Equalizers.
				</span>
                </div>

                <label class="control-label">环回</label>
                <div class="controls">
                    <div class="toggle">
                        <label class="toggle-radio toggle-alsa-loopback" for="toggle-alsa-loopback-2">开</label>$_select[alsa_loopback_on]
                        <label class="toggle-radio toggle-alsa-loopback" for="toggle-alsa-loopback-1">关</label>$_select[alsa_loopback_off]
                    </div>
                    <button id="btn-set-alsa-loopback" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                            name="update_alsa_loopback" value="novalue" $_alsa_loopback_disable><i
                        class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
                    <a aria-label="Help" class="config-info-toggle" data-cmd="info-alsa-loopback" href="#notarget"><i
                        class="fa-regular fa-sharp fa-info-circle"></i></a>
                    <span id="info-alsa-loopback" class="config-help-info">
					The Loopback device provides a copy of the PCM output stream that can be accessed by reading "hw:Loopback,1,0".<br>
					<b>-</b> Loopback is not supported for CamillaDSP.<br>
					<b>-</b> Loopback requires > 44.1K for Pi-3 HDMI/Headphone (does not apply if Multiroom Sender is on).
                </span>
                </div>

                <div $_feat_multiroom">
                <label class="control-label">多房间</label>
                <div class="controls">
                    <a href="trx-config.php">
                        <button class="btn btn-primary btn-medium config-btn">配置</button>
                    </a>
                    <span class="config-help-static">
						设置多房间发送器和接收器。
		            </span>
                </div>
            </div>
    </div>

    <legend>MPD选项</legend>
    <p class="sub-legend">
        音乐播放器守护程序(MPD)是一个灵活、强大的用于播放音乐的服务器端应用程序,是moOde中的主要音频应用程序。MPD设置,包括DSD、SoX重采样、音频缓冲区和其他设置,通过''编辑''按钮进行配置.
    </p>

    <div class="config-horiz-rule">常规</div>
    <div class="control-group">
        <label class="control-label">MPD设置</label>
        <div class="controls">
            <a href="mpd-config.php">
                <button class="btn btn-primary btn-medium config-btn">编辑</button>
            </a>
        </div>

        <div class="controls">
            <a data-toggle="modal" href="#mpd-restart">
                <button class="btn btn-medium btn-primary config-btn">重启</button>
            </a>
            <span class="config-btn-after">MPD</span>
        </div>

        <label class="control-label">启动后自动播放</label>
        <div class="controls">
            <div class="toggle">
                <label class="toggle-radio toggle-autoplay" for="toggle-autoplay-2">开</label>$_select[autoplay_on]
                <label class="toggle-radio toggle-autoplay" for="toggle-autoplay-1">关</label>$_select[autoplay_off]
            </div>
            <button id="btn-set-autoplay" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                    name="update_autoplay" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            <a aria-label="Help" class="config-info-toggle" data-cmd="info-autoplay" href="#notarget"><i
                class="fa-regular fa-sharp fa-info-circle"></i></a>
            <span id="info-autoplay" class="config-help-info">
					Start auto-shuffle random play if it was previously active or play last played item.
                </span>
        </div>

        <label class="control-label">元数据文件</label>
        <div class="controls">
            <div class="toggle">
                <label class="toggle-radio toggle-extmeta" for="toggle-extmeta-2">开</label>$_select[extmeta_on]
                <label class="toggle-radio toggle-extmeta" for="toggle-extmeta-1">关</label>$_select[extmeta_off]
            </div>
            <button id="btn-set-extmeta" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                    name="update_extmeta" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            <a aria-label="Help" class="config-info-toggle" data-cmd="info-extmeta" href="#notarget"><i
                class="fa-regular fa-sharp fa-info-circle"></i></a>
            <span id="info-extmeta" class="config-help-info">
					Maintain enhanced metadata for the currently playing song or station in the /var/local/www/currentsong.txt file. This file is updated within three seconds after any metadata updates on the UI.
                </span>
        </div>
    </div>

    <div class="config-horiz-rule">自动乱序</div>
    <div class="control-group">
        <label class="control-label">自动乱序</label>
        <div class="controls">
            <div class="toggle">
                <label class="toggle-radio toggle-ashufflesvc" for="toggle-ashufflesvc-2">开</label>$_select[ashufflesvc_on]
                <label class="toggle-radio toggle-ashufflesvc" for="toggle-ashufflesvc-1">关</label>$_select[ashufflesvc_off]
            </div>
            <button id="btn-set-ashufflesvc" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                    name="update_ashufflesvc" value="novalue">
                <i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i>
            </button>
            <a aria-label="帮助" class="config-info-toggle" data-cmd="info-ashufflesvc" href="#notarget">
                <i class="fa-regular fa-sharp fa-info-circle"></i>
            </a>
            <span id="info-ashufflesvc" class="config-help-info">
        当播放列表中的最后一首歌播放完毕后，自动乱序将从音乐库中随机选择两首歌曲添加到播放列表的末尾，然后重复这个过程。这创建了一个不断流动的音乐，而不会增加播放列表的大小，并且两首曲目使得MPD交叉淡入成为可能。注意：自动乱序替代了MPD随机播放作为“随机”按钮的方法。
    </span>
        </div>

        <label class="control-label" for="ashuffle-mode">模式</label>
        <div class="controls">
            <select id="ashuffle-mode" class="config-select-large" name="ashuffle_mode" onchange="autoClick('#btn-set-ashuffle-mode');">
                $_select[ashuffle_mode]
            </select>
            <button id="btn-set-ashuffle-mode" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                    name="update_ashuffle_mode" value="novalue">
                <i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i>
            </button>
            <a aria-label="帮助" class="config-info-toggle" data-cmd="info_ashuffle_mode" href="#notarget">
                <i class="fa-regular fa-sharp fa-info-circle"></i>
            </a>
            <span id="info_ashuffle_mode" class="config-help-info">
        随机播放选择的曲目或整张专辑。
    </span>
        </div>

        <label class="control-label" for="ashuffle-window">视窗大小</label>
        <div class="controls">
            <input class="config-input-large" type="number" maxlength="3" min="1" max="1024" id="ashuffle-window" name="ashuffle_window"
                   value="$_ashuffle_window" required>
            <button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_ashuffle_window" value="novalue">
                <i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i>
            </button>
            <a aria-label="帮助" class="config-info-toggle" data-cmd="info-ashuffle-window" href="#notarget">
                <i class="fa-regular fa-sharp fa-info-circle"></i>
            </a>
            <span id="info-ashuffle-window" class="config-help-info">
        设置用于乱序算法的“窗口”的大小。较小的数字意味着更频繁的重复，而较大的数字意味着较少的重复。默认窗口大小为7。
    </span>
        </div>


        <label class="control-label" for="ashuffle-filter">标记过滤</label>
        <div class="controls">
            <input class="config-input-large" type="text" id="ashuffle-filter" name="ashuffle_filter" value="$_ashuffle_filter">
            <button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_ashuffle_filter" value="novalue">
                <i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            <a aria-label="帮助" class="config-info-toggle" data-cmd="info_ashuffle_filter" href="#notarget"><i
                class="fa-regular fa-sharp fa-info-circle"></i></a>
            <span id="info_ashuffle_filter" class="config-help-info">
        Auto-shuffle 用于选择要随机播放的曲目的 TAG VALUE 对字符串。
        每个 TAG 只能出现一次。过滤器不区分大小写，并执行 TAG 包含 VALUE 子字符串匹配。<br>
        <b>例如：</b> genre "indie rock" artist coldplay<br>
        <b>例如：</b> filename "NAS/Music/Led Zeppelin"
    </span>
        </div>
    </div>

    <div class="config-horiz-rule">音量选项</div>
    <div class="control-group">
        <label class="control-label" for="volume-step-limit">音量步进限制</label>
        <div class="controls">
            <select id="volume-step-limit" class="config-select-large" name="volume_step_limit"
                    onchange="autoClick('#btn-set-volume-step-limit');">
                $_select[volume_step_limit]
            </select>
            <button id="btn-set-volume-step-limit" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                    name="update_volume_step_limit" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            <a aria-label="帮助" class="config-info-toggle" data-cmd="info_volume_step_limit" href="#notarget"><i
                class="fa-regular fa-sharp fa-info-circle"></i></a>
            <span id="info_volume_step_limit" class="config-help-info">
            设置音量旋钮每次点击时向前移动的最大增量。
        </span>
        </div>

        <label class="control-label" for="volume-mpd-max">最大MPD音量</label>
        <div class="controls">
            <input class="config-input-large" type="number" maxlength="3" min="1" max="100" id="volume-mpd-max" name="volume_mpd_max"
                   value="$_volume_mpd_max" required>
            <button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_volume_mpd_max" value="novalue">
                <i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            <a aria-label="帮助" class="config-info-toggle" data-cmd="info_volume_mpd_max" href="#notarget"><i
                class="fa-regular fa-sharp fa-info-circle"></i></a>
            <span id="info_volume_mpd_max" class="config-help-info">
            确定可以设置的最高音量旋钮级别。
        </span>
        </div>

        <label class="control-label">显示dB音量</label>
        <div class="controls">
            <div class="toggle">
                <label class="toggle-radio toggle-volume-db-display" for="toggle-volume-db-display-2">开</label>$_select[volume_db_display_on]
                <label class="toggle-radio toggle-volume-db-display" for="toggle-volume-db-display-1">关</label>$_select[volume_db_display_off]
            </div>
            <button id="btn-set-volume-db-display" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                    name="update_volume_db_display" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            <a aria-label="帮助" class="config-info-toggle" data-cmd="info_volume_db_display" href="#notarget"><i
                class="fa-regular fa-sharp fa-info-circle"></i></a>
            <span id="info_volume_db_display" class="config-help-info">
            在音量旋钮旁边显示 dB 音量与 0-100 级别。
        </span>
        </div>
    </div>


    <div class="config-horiz-rule">DSP选项</div>
    <p class="sub-legend">
        请注意,均衡器,交叉馈送和极性反转是互斥的.启用其中一个会禁用其他.
    </p>

    <div class="control-group">
        <label class="control-label" for="mpdcrossfade">交叉衰减(秒)</label>
        <div class="controls">
            <input class="config-input-large" type="number" maxlength="2" min="0" max="15" id="mpdcrossfade" name="mpdcrossfade"
                   value="$_mpdcrossfade" required>
            <button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_mpdcrossfade" value="novalue"><i
                class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            <a aria-label="Help" class="config-info-toggle" data-cmd="info-mpdcrossfade" href="#notarget"><i
                class="fa-regular fa-sharp fa-info-circle"></i></a>
            <span id="info-mpdcrossfade" class="config-help-info">
    MPD 音频缓冲区必须足够大，以便为给定音频格式执行所请求的交叉淡出秒数。设置为 0 可以禁用交叉淡出。
</span>
        </div>

        <label class="control-label" for="crossfeed">交叉馈送</label>
        <div class="controls">
            <select id="crossfeed" class="config-select-large" name="crossfeed" onchange="autoClick('#btn-set-crossfeed');"
                    $_crossfeed_ctl_disabled>
                $_select[crossfeed]
            </select>
            <button id="btn-set-crossfeed" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                    name="update_crossfeed" value="novalue" $_crossfeed_ctl_disabled><i
                class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            <a aria-label="帮助" class="config-info-toggle" data-cmd="info-crossfeed" href="#notarget"><i
                class="fa-regular fa-sharp fa-info-circle"></i></a>
            <span id="info-crossfeed" class="config-help-info">
        <b>700 Hz, 3.0 dB - Linkwitz</b><br>
        - 近似于原始 Linkwitz 交叉馈送，方位角为 40 度。最高的交叉馈送级别，最低的分离度。<br>
        <b>700 Hz, 4.5 dB - Bauer</b><br>
        - 近似于距离约 3 米、方位角为 30 度的虚拟扬声器位置。<br>
        <b>800 Hz, 6.0 dB - Chu Moy</b><br>
        - 近似于 Chu Moy 修改的 Linkwitz 交叉馈送。<br>
        <b>650 Hz, 10.0 dB - Jan Meier</b><br>
        - 近似于 Jan Meier 自然交叉馈送。最低的交叉馈送级别，最高的分离度。<br>
    </span>
        </div>

        <label class="control-label">极性反转</label>
        <div class="controls">
            <div class="toggle">
                <label class="toggle-radio toggle-invert-polarity" for="toggle-invert-polarity-2">开</label>$_select[invert_polarity_on]
                <label class="toggle-radio toggle-invert-polarity" for="toggle-invert-polarity-1">关</label>$_select[invert_polarity_off]
            </div>
            <button id="btn-set-invert-polarity" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                    name="update_invert_polarity" value="novalue" $_invpolarity_ctl_disabled><i
                class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            <a aria-label="帮助" class="config-info-toggle" data-cmd="info_invert_polarity" href="#notarget"><i
                class="fa-regular fa-sharp fa-info-circle"></i></a>
            <span id="info_invert_polarity" class="config-help-info">
        将每个通道的波形从 +/- 改为 -/+。<br>
    </span>
        </div>

    </div>

    <div class="config-horiz-rule">HTTP流</div>
    <div class="control-group">
        <label class="control-label">流服务器</label>
        <div class="controls">
            <div class="toggle">
                <label class="toggle-radio toggle-mpd-httpd" for="toggle-mpd-httpd-2">开</label>$_select[mpd_httpd_on]
                <label class="toggle-radio toggle-mpd-httpd" for="toggle-mpd-httpd-1">关</label>$_select[mpd_httpd_off]
            </div>
            <button id="btn-set-mpd-httpd" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                    name="update_mpd_httpd" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            <a aria-label="帮助" class="config-info-toggle" data-cmd="info-mpd-httpd" href="#notarget"><i
                class="fa-regular fa-sharp fa-info-circle"></i></a>
            <span id="info-mpd-httpd" class="config-help-info">
        提供 MPD 输出作为指定端口的 HTTP 流。<br>
    </span>
        </div>

        <label class="control-label" for="mpd-httpd-port">端口</label>
        <div class="controls">
            <input class="config-input-large" type="number" maxlength="4" min="8000" max="9000" id="mpd-httpd-port" name="mpd_httpd_port"
                   value="$_mpd_httpd_port" required>
            <button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_mpd-httpd_port" value="novalue">
                <i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            <a aria-label="帮助" class="config-info-toggle" data-cmd="info-mpd-httpd-port" href="#notarget"><i
                class="fa-regular fa-sharp fa-info-circle"></i></a>
            <span id="info-mpd-httpd-port" class="config-help-info">
        默认端口为 8000。端口范围为 8000 - 9000。
    </span>
        </div>

        <label class="control-label" for="mpd-httpd-encoder">编码</label>
        <div class="controls">
            <select id="mpd-httpd-encoder" class="config-select-large" name="mpd_httpd_encoder"
                    onchange="autoClick('#btn-set-mpd-httpd-encoder');">
                $_select[mpd_httpd_encoder]
            </select>
            <button id="btn-set-mpd-httpd-encoder" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                    name="update_mpd_httpd_encoder" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            <a aria-label="帮助" class="config-info-toggle" data-cmd="info-mpd-httpd-encoder" href="#notarget"><i
                class="fa-regular fa-sharp fa-info-circle"></i></a>
            <span id="info-mpd-httpd-encoder" class="config-help-info">
        使用 FLAC 编码（压缩级别 0，速度最快，压缩最少）或 LAME (MP3) 以 320 kbps 进行流编码。
    </span>
        </div>


        <legend>均衡器</legend>
        <p class="sub-legend">
            均衡器由MPD、AirPlay、Spotify和蓝牙入站渲染器支持.如果蓝牙音频输出设置为“蓝牙扬声器”或多房间发送器或接收器打开,则它们不可用。
            请注意，均衡器、交叉馈送和极性反转是互斥的.启用其中一个会禁用其他.
        </p>

        <div class="control-group">
            <label class="control-label" for="cdsp-mode">CamillaDSP</label>
            <div class="controls">
                <select id="cdsp-mode" class="config-select-large" name="cdsp_mode" onchange="autoClick('#btn-set-cdsp-mode');"
                        $_cdsp_mode_ctl_disabled>
                    $_select[cdsp_mode]
                </select>
                <button id="btn-set-cdsp-mode" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                        name="update_cdsp_mode" value="novalue" $_cdsp_mode_ctl_disabled>
                    <i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i>
                </button>
                <a aria-label="帮助" class="config-info-toggle" data-cmd="info-cdsp-mode" href="#notarget">
                    <i class="fa-regular fa-sharp fa-info-circle"></i>
                </a>
                <span id="cdsp-config-description" class="config-help-static">
        $_config_description<br>
        $_config_check
    </span>
                <span id="info-cdsp-mode" class="config-help-info">
        CamillaDSP 是一个通用数字信号处理引擎，用于路由和过滤声音。它可以用于构建主动扬声器的分频器、进行房间校正、均衡或音量控制。CamillaDSP 由 Henrik Enquist 维护，集成到 moOde 中是由 @bitlab 完成的。<br>
        特性概述：<br>
        - IIR 过滤器（BiQuad）<br>
        - FIR 过滤器（通过 FFT 卷积）<br>
        - 内置采样率转换器<br>
        - 过滤器可以自由串联<br>
        - 灵活的路由<br>
        - 简单的 YAML 配置<br>
        - 所有计算均使用 64 位浮点数完成<br>
        - 使用 ARM Neon 64 位指令集<br>
        - 带专家模式的管道编辑器<br>
        - 配置可在 CamillaDSP 设置页面管理。
    </span>
            </div>

            <div class="controls">
                <a href="cdsp-config.php">
                    <button class="btn btn-medium btn-primary config-btn" $_cdsp_mode_ctl_disabled>编辑</button>
                </a>
                <span class="config-btn-after">CamillaDSP 设置</span>
            </div>

            <label class="control-label" for="eqfa12p">参数 EQ</label>
            <div class="controls">
                <select id="eqfa12p" class="config-select-large" name="eqfa12p" onchange="autoClick('#btn-set-eqfa12p');"
                        $_eqfa12p_ctl_disabled>
                    $_select[eqfa12p]
                </select>
                <button id="btn-set-eqfa12p" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                        name="update_eqfa12p" value="novalue" $_eqfa12p_ctl_disabled>
                    <i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i>
                </button>
                <a aria-label="帮助" class="config-info-toggle" data-cmd="info-eqp" href="#notarget">
                    <i class="fa-regular fa-sharp fa-info-circle"></i>
                </a>
                <span id="info-eqp" class="config-help-info">
        三个 x 四个 Mitra-Regalia 峰值均衡器过滤器串联；Fons Adriaensens 的“Parametric1”均衡器的向量算术重新实现（fafil），具有小的差异。并行化的串行过滤器组织导致输出延迟三个样本。此 EQ 使用 @bitlab 自定义的 eqfa12p 组件，属于 Tim Goetze 编写的 CAPS DSP 程序套件。<br>
        <b>注意：</b>均衡器处理适用于 MPD、AirPlay 和 Spotify 输出。<br>
    </span>
            </div>


            <div class="controls">
                <a href="eqp-config.php">
                    <button class="btn btn-medium btn-primary config-btn">编辑</button>
                </a>
                <span class="config-btn-after">EQ曲线</span>
            </div>

            <label class="control-label" for="alsaequal">图形EQ</label>
            <div class="controls">
                <select id="alsaequal" class="config-select-large" name="alsaequal" onchange="autoClick('#btn-set-alsaequal');"
                        $_alsaequal_ctl_disabled>
                    $_select[alsaequal]
                </select>
                <button id="btn-set-alsaequal" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit"
                        name="update_alsaequal" value="novalue" $_alsaequal_ctl_disabled>
                    <i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i>
                </button>
                <a aria-label="帮助" class="config-info-toggle" data-cmd="info-alsaequal" href="#notarget">
                    <i class="fa-regular fa-sharp fa-info-circle"></i>
                </a>
                <span id="info-alsaequal" class="config-help-info">
        经典的八度带、恒定 Q、二阶滤波器设计。超过奈奎斯特频率的频带会自动禁用。此均衡器使用 Tim Goetze 编写的 CAPS DSP 程序套件中的 Eq10X2 组件。<br>
        <b>注意：</b>均衡器处理适用于 MPD、AirPlay 和 Spotify 输出。<br>
    </span>
            </div>


            <div class="controls">
                <a href="eqg-config.php">
                    <button class="btn btn-medium btn-primary config-btn">编辑</button>
                </a>
                <span class="config-btn-after">EQ曲线</span>
            </div>
        </div>
        </form>
    </div>
</div>

<form class="form-horizontal" method="post">
    <div id="mpd-restart" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="mpd-restart-label" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h3>重启MPD服务?</h3>
        </div>
        <div class="modal-body"></div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
            <button class="btn btn-primary btn-submit" type="submit" name="mpdrestart" value="1">确认</button>
        </div>
    </div>
</form>
